(sit-for): Fix obsolete form for nil second argument.
authorGlenn Morris <rgm@gnu.org>
Thu, 21 Feb 2008 08:11:39 +0000 (08:11 +0000)
committerGlenn Morris <rgm@gnu.org>
Thu, 21 Feb 2008 08:11:39 +0000 (08:11 +0000)
lisp/subr.el

index 8420c8553dd6b7b7347e74fe8a1532bba86e7f80..329c4ca2c24ae551bbc721821545872cd0924f40 100644 (file)
@@ -1763,9 +1763,10 @@ in milliseconds; this was useful when Emacs was built without
 floating point support.
 
 \(fn SECONDS &optional NODISP)"
-  (when (or obsolete (numberp nodisp))
-    (setq seconds (+ seconds (* 1e-3 nodisp)))
-    (setq nodisp obsolete))
+  (if (numberp nodisp)
+      (setq seconds (+ seconds (* 1e-3 nodisp))
+            nodisp obsolete)
+    (if obsolete (setq nodisp obsolete)))
   (cond
    (noninteractive
     (sleep-for seconds)